From: Georges Basile Stavracas Neto Date: Mon, 9 Jul 2018 07:49:37 +0000 (+0200) Subject: inspector: Stop using Shell.GenericContainer X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~897^2~1^2~86 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=b4c674900f3d63057fbfb8357581e1e16ecb386a;p=gnome-shell.git inspector: Stop using Shell.GenericContainer No alarms and no surprises here. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/153 --- diff --git a/js/ui/lookingGlass.js b/js/ui/lookingGlass.js index ea5b759ec..34c60cb65 100644 --- a/js/ui/lookingGlass.js +++ b/js/ui/lookingGlass.js @@ -4,6 +4,7 @@ const Clutter = imports.gi.Clutter; const Cogl = imports.gi.Cogl; const GLib = imports.gi.GLib; const Gio = imports.gi.Gio; +const GObject = imports.gi.GObject; const Gtk = imports.gi.Gtk; const Meta = imports.gi.Meta; const Pango = imports.gi.Pango; @@ -501,18 +502,21 @@ var RedBorderEffect = new Lang.Class({ var Inspector = new Lang.Class({ Name: 'Inspector', + Extends: Clutter.Actor, + Signals: { 'closed': {}, + 'target': { param_types: [Clutter.Actor.$gtype, GObject.TYPE_DOUBLE, GObject.TYPE_DOUBLE] } }, _init(lookingGlass) { - let container = new Shell.GenericContainer({ width: 0, - height: 0 }); - container.connect('allocate', this._allocate.bind(this)); - Main.uiGroup.add_actor(container); + this.parent({ width: 0, + height: 0 }); + + Main.uiGroup.add_actor(this); let eventHandler = new St.BoxLayout({ name: 'LookingGlassDialog', vertical: false, reactive: true }); this._eventHandler = eventHandler; - container.add_actor(eventHandler); + this.add_actor(eventHandler); this._displayText = new St.Label(); eventHandler.add(this._displayText, { expand: true }); @@ -534,7 +538,9 @@ var Inspector = new Lang.Class({ this._lookingGlass = lookingGlass; }, - _allocate(actor, box, flags) { + vfunc_allocate(box, flags) { + this.set_allocation(box, flags); + if (!this._eventHandler) return; @@ -631,8 +637,6 @@ var Inspector = new Lang.Class({ } }); -Signals.addSignalMethods(Inspector.prototype); - var Extensions = new Lang.Class({ Name: 'Extensions',